popover: Don't try to compute_bounds of a NULL child
authorTimm Bäder <mail@baedert.org>
Sat, 16 Mar 2019 05:16:28 +0000 (06:16 +0100)
committerTimm Bäder <mail@baedert.org>
Mon, 25 Mar 2019 14:57:30 +0000 (15:57 +0100)
gtk/gtkpopover.c

index c77ddc3f2524a225e0a5448b2c3cdb6e2e710a79..e118eb0e1f3155433e48cf3e9f4a40c37cc68437 100644 (file)
@@ -338,7 +338,8 @@ gesture_released (GtkGestureMultiPress *gesture,
     return;
 
   child = gtk_bin_get_child (GTK_BIN (popover));
-  if (!gtk_widget_compute_bounds (child, GTK_WIDGET (popover), &child_bounds) ||
+  if (!child ||
+      !gtk_widget_compute_bounds (child, GTK_WIDGET (popover), &child_bounds) ||
       !graphene_rect_contains_point (&child_bounds,
                                      &(graphene_point_t){x, y}))
     gtk_popover_popdown (popover);